<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-09-30 11:09:53
 * @LastEditTime: 2019-10-03 20:01:20
 * @LastEditors: Please set LastEditors
 -->
<template>
  <div>
    <headers :name="title"></headers>
    <div class="tabs">
      <div :class="['tabs-item', active===0?'active':'']" @click="toggleTabs(0)">患者列表</div>
      <div :class="['tabs-item', active===1?'active':'']" @click="toggleTabs(1)">就诊列表</div>
    </div>
    <div v-if="active === 1">
      <div class="bar">
        <img src="/static/images/assistant.png" alt="" class="icon">
        <span>个人资料</span>
      </div>
      <div class="list">
        <div class="item">
          <span class="key">姓名</span>
          <span class="value">西兰</span>
        </div>
        <div class="item">
          <span class="key">性别</span>
          <span class="value">男</span>
        </div>
        <div class="item">
          <span class="key">出生日期</span>
          <span class="value">1994.11.09</span>
        </div>
        <div class="item">
          <span class="key">身高</span>
          <span class="value">178cm</span>
        </div>
      </div>
    </div>
    <div v-if="active === 0" class="record">
      <div class="record-item">
        <div>
          <span class="record-left">【就诊医院】</span>
          <span class="record-right">长春不孕不育医院</span>
        </div>
        <div>
          <span class="record-left">【主治医生】</span>
          <span class="record-right">西兰</span>
        </div>
        <div>
          <span class="record-left">【病史】</span>
          <span class="record-right">社会主义核心价值观社会主义核心价值观社会主义核心价值观社会主义核心价值观社会主义核心价值观</span>
        </div>
        <div class="showOrHide" @click="showOrHide">
          展开
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  // Use Vuex
  import store from "./store";
  import headers from "@/pages/headers/index.vue";

  export default {
    data() {
      return {
        headerHeight: 0,
        title: "健康档案",
        active: 0
      };
    },
    components: {
      headers
    },
    computed: {
      count() {
        return store.state.count;
      }
    },
    methods: {
      increment() {
        store.commit("increment");
      },
      decrement() {
        store.commit("decrement");
      },
      toggleTabs(index){
        this.active = index;
      },
      showOrHide(){

      }
    },
    mounted() {

    }
  };
</script>

<style scoped>
  .tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    text-align: center;
  }

  .tabs-item {
    /*flex-grow: 1;*/
    width: 45%;
    height: 50px;
    line-height: 50px;
    font-size: 15px;
    border-bottom: 3px solid transparent;
    color: #000000;
  }

  .active {
    border-bottom: 3px solid #5e71f4;
    color: #5e71f4;
  }

  .bar {
    height: 40px;
    background: #f3f1f4;
    padding: 0 15px;
    font-size: 13px;
    color: #525053;
    line-height: 40px;
    display: flex;
    align-items: center;
  }

  .item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 16px;
    font-size: 14px;
    height: 38px;
    border-bottom: 1px solid #cdcdcf;
  }

  .value {
    color: #4f4d50;
  }
  .record{
    background: #f3f1f4;
    min-height: calc(100vh - 120px);
    padding-top: 20px;
  }
  .record-item{
    padding-top: 16px;
    padding-left: 5px;
    background-color: #ffffff;
    border-radius: 6px;
    margin: 10px;
    padding-bottom: 8px;
    margin-top: 0;
  }
  .record-left{
    font-size: 15px;
    color: #000000;
  }
  .record-right{
    font-size: 14px;
    color: #525252;
  }
  .icon{
    width: 15px;
    height: 15px;
    margin-right: 10px;
  }
  .showOrHide{
    text-align: right;
    padding-right: 8px;
    color: #5e71f4;
    font-size: 14px;
  }
</style>
